<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<!DOCTYPE html>

<c:set var="str" value="${pageContext.session.getAttribute('com.petrooil.model.UserRoles')}"/>
<c:if test="${fn:contains(str, 'ROLE_ADMIN')}">
</c:if>
<c:choose>
    <c:when test="${fn:contains(str, 'ROLE_ADMIN')}">
        <jsp:include page="./../navbar/administratorBar.jsp"/>
    </c:when>
    <c:when test="${fn:contains(str, 'ROLE_USER')}">
            <jsp:include page="./../navbar/userBar.jsp"/>
    </c:when>
    <c:otherwise>
            <jsp:include page="./../navbar/registerBar.jsp"/>
    </c:otherwise>
</c:choose>
